<template>
  <div class="news-section sport">
    <h2>体育新闻</h2>
    
    <div class="news-list">
      <div class="news-item">
        <div class="news-image">
          <img src="https://picsum.photos/seed/sport1/300/200" alt="足球比赛新闻配图">
        </div>
        <div class="news-content">
          <h3>国足世预赛取得关键胜利</h3>
          <p>在刚刚结束的世界杯预选赛亚洲区比赛中，中国男足凭借下半场的两粒进球，以2-0战胜对手，取得了世预赛征程中的关键三分，保留了晋级希望...</p>
          <div class="news-meta">
            <span>2024-05-18</span>
            <span>来源：体育周报</span>
          </div>
        </div>
      </div>
      
      <div class="news-item">
        <div class="news-image">
          <img src="https://picsum.photos/seed/sport2/300/200" alt="篮球比赛新闻配图">
        </div>
        <div class="news-content">
          <h3>CBA总决赛第三场：广东队逆转辽宁</h3>
          <p>CBA总决赛第三场较量中，广东队在落后15分的情况下实现逆转，以102-98战胜辽宁队，将总比分扳为1-2。外援威姆斯砍下全场最高的32分...</p>
          <div class="news-meta">
            <span>2024-05-17</span>
            <span>来源：篮球先锋报</span>
          </div>
        </div>
      </div>
      
      <div class="news-item">
        <h3>奥运会倒计时100天 中国代表团名单公布</h3>
        <p>距离巴黎奥运会开幕还有100天，中国体育代表团首批参赛名单正式公布，共有387名运动员获得参赛资格，将参加26个大项的角逐...</p>
        <div class="news-meta">
          <span>2024-05-16</span>
          <span>来源：奥运频道</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
</script>

<style scoped>
.news-section {
  background-color: #fff;
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.news-section h2 {
  color:pink;
  background-color: #27ae60;
  padding: 10px 15px;
  margin: 0 0 20px 0;
  display: inline-block;
  border-radius: 4px;
  font-size: 20px;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-item {
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.news-item:last-child {
  border-bottom: none;
}

.news-image {
  width: 300px;
  height: 200px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.news-image img:hover {
  transform: scale(1.05);
}

.news-content h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: #333;
  transition: color 0.2s;
}

.news-content h3:hover {
  color: #27ae60;
}

.news-content p {
  margin: 0 0 10px 0;
  color: #666;
  line-height: 1.6;
  font-size: 14px;
}

.news-meta {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #999;
}

@media (max-width: 768px) {
  .news-item {
    flex-direction: column;
  }
  
  .news-image {
    width: 100%;
    height: auto;
  }
}
</style>
    